package org.samcolon.nettydemo.nettydemo.netty;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description: netty启动
 * @author: Sam.zhang
 * @date: 2021/12/26 - 18:06
 */
@Order(1)
@Component
public class NettyCommand implements CommandLineRunner {
    @Resource
    private NetWebsocketServer netWebsocketServer;
    @Override
    public void run(String... args) throws Exception {
        netWebsocketServer.start();
    }
}
